package com.linkwechat.common.exception;

import com.linkwechat.common.enums.ResponseEnum;
import lombok.Data;

/**
 * @Author 王君平
 * @Date
 * @Description
 */
@Data
public class BusinessException extends RuntimeException{

    private Integer code;

    private String msg;

    public BusinessException(Integer code, String msg) {
        super();
        this.code = code;
        this.msg = msg;
    }

    public BusinessException(String msg) {
        super();
        this.code = ResponseEnum.FAIL.getCode();
        this.msg = msg;
    }

}
